package com.woniuxy.dudugua.mapper;

import com.woniuxy.dudugua.entity.Category;
import com.woniuxy.dudugua.entity.Product;
import com.woniuxy.dudugua.entity.ProductExample;
import java.util.List;
import java.util.Map;


import com.woniuxy.dudugua.util.view.*;
import org.apache.ibatis.annotations.Param;

public interface ProductMapper {
    long countByExample(ProductExample example);

    int deleteByExample(ProductExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Product record);

    int insertSelective(Product record);

    List<Product> selectByExample(ProductExample example);

    Product selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Product record, @Param("example") ProductExample example);

    int updateByExample(@Param("record") Product record, @Param("example") ProductExample example);

    int updateByPrimaryKeySelective(Product record);

    int updateByPrimaryKey(Product record);


    //丽人馆
    List<Product>  selectByProduct() throws  Exception;
    //店铺轮播图 热销商品3件
    List<StoreNavBar> selectStoreProductHot(int sid);
    //主页-->全部商品
    List<ProductAllView>  selectByProuct() throws   Exception;
    //主页-->护肤
    List<ProductSkinCare>  selectByProductSkinCare() throws  Exception;
    //主页-->纹绣
    List<ProductTattoView>   selectByProductTatto()  throws  Exception;
    //主页-->彩妆
    List<ProductCosmetics>   selectByProductCosmetics() throws   Exception;
    //主页-->学习工具
    List<ProductLearningTool>   selectByProductLearningTool()  throws   Exception;

    //海淘馆
    List<OverseasView>  selectByProductOverseas()  throws  Exception;

    //生活馆
    List<OverseasView>  selectByProductFood() throws Exception;

    //专业馆
    List<OverseasView>  selectByProductMajor() throws  Exception;

    //修改订单状态
    Integer   updateByAdminProductStatus(int id)  throws Exception;

    //查询所有商品
    List<Product> selectByAdminProductAll()  throws  Exception;

    //店铺出售商品的种类数量
    List<Product>   selectByProductStoreId()  throws  Exception;

    List<ProductView> selectDetailByExample(Map<String, Object> params);

    Product getProductById(Integer id);

    ProductInfoView selectById(Integer id);

    List<ProView> selectPro();

    Product selectMax();
}